Flash interceptor (FlashInterceptor) possibly with FlashResult
allows current action to be available even after a redirect. It does this by
saving the current action into http session and pushing it back into the stack
next request, resulting in the nett effect of the action and its related information
being available across redirect.
Parameters
- key - The Http Session key under which the action will be stored,
default to FlashInterceptor#DEFAULT_KEY which is
the string '__flashAction'.
- operation - The operation mode of this interceptor, either
FlashInterceptor#STORE having a string value of 'Store' or
FlashInterceptor#RETRIEVE having a string value of 'Retrieve'
The default operation mode is FlashInterceptor#RETRIEVE
Extending the Interceptor
There's no intended extension points
Examples
<action name="store" ...>
<interceptor-ref name="flash">
<param name="operation">Store</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result type="redirect">redirectToSomeWhere.jsp</result>
</action>
<action name="retrieve">
<interceptor-ref name="flash">
<param name="operation">Retrieve</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result>pageWhereWeNeedFlashActionStored.jsp</result>
</action>
<action name="store">
<result type="flash">redirectToSomeWhere.jsp</result>
</action>
<action name="retrieve">
<interceptor-ref name="flash">
<param name="operation">Retrieve</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
<result>pageWhereWeNeedFlashActionStored.jsp</result>
</action>
|